<template>
  <div>
    <el-carousel :interval="5000" arrow="always">
      <el-carousel-item v-for="item in list" :key="item">
        <h3>{{ item }}</h3>
      </el-carousel-item>
    </el-carousel>
    <el-button type="primary" @click="addDialogVisible=true"  style="margin-left: 1035px;margin-top: 10px">添加</el-button>
    <el-table :data="list" border stripe>
      <el-table-column label="编号" prop="id"></el-table-column>
      <el-table-column label="图片url" prop="url"></el-table-column>

      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button type="warning" size="mini" @click="showEditDialog(scope.row)">编辑</el-button>
          <el-button type="danger" size="mini" @click="removeUserById(scope.row.id)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<style>
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  background-color: #d3dce6;
}
</style>
<script>
export default {
  data(){
    return{
      list:[1,2,3]
    }
  }
}
</script>